
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreCategoryRequest struct {

	Pid string `json:"pid" form:"pid"`

	CateName string `json:"cate_name" form:"cate_name"`

	Sort string `json:"sort" form:"sort"`

	Pic string `json:"pic" form:"pic"`

	IsShow string `json:"is_show" form:"is_show"`

	AddTime string `json:"add_time" form:"add_time"`

	BigPic string `json:"big_pic" form:"big_pic"`

}

func (r *StoreCategoryRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreCategoryRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"pid": "required",

		"cate_name": "required",

		"sort": "required",

		"pic": "required",

		"is_show": "required",

		"add_time": "required",

		"big_pic": "required",

	}
}

func (r *StoreCategoryRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreCategoryRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreCategoryRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
